package project.student_info_manage;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.List;

/**
 * description:
 * author: xiaoxu
 * createTime: 2018-12-05 13:16
 **/
public class StudentsDao {

    //插入学生信息
    public void insertStudent(Student student) throws SQLException {
        //获取连接
        Connection conn = DbUtil.getConnection();
        String sql = "";
        PreparedStatement ptmt = conn.prepareStatement(sql);
        ptmt.setString(1, "5");
        ptmt.setString(2, "猪");
        ptmt.setInt(3, 4);
        ptmt.setInt(4, 0);
        ptmt.execute();
    }

    //删除
    public void deleteStudent(){

    }

    //修改
    public void updateStudent(){

    }

    //通过ID查询学生信息
    public Student getStudentById(String id){
        return null;
    }
    //通过name查询学生信息
    private List<Student> getStudentByName(String name){
        return null;
    }

    //通过成绩区间查询学生信息
    private List<Student> getStudentByGrade(int min,int max){
        return null;
    }





}
